package com.homework8;

import com.homework7.Student;

import java.io.*;

public class demo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fileInputStream = new FileInputStream("D:\\STU.txt");
        ObjectInputStream in = new ObjectInputStream(fileInputStream);
        Object string = null;
        try {
            while ((string = in.readObject()) != null) {
                System.out.println(string);
            }
        } catch (IOException E) {
            E.getStackTrace();
        }
    }
}

